<?php
#include_once("../lib/auth.php");
include_once "../lib/login.php";
include_once "sajax.php";
//$_start = microtime();
// --- [ Start ] --------------------------------------------------------------

include_once "../lib/core.class.php";
include_once "aframework.php";
include_once "actions_ajax.php";

$frm =& new AdminFramework();

$core = getCoreInstance();

$core->setFramework($frm);
$core = getCoreInstance();
$core->initialize();



$GLOBALS['db']=&$core->getProperty("db");

switch ($_GET['path'])
{
    case "discounts_type" :
        sajax_init();
        sajax_export("GetListDiscounts");
        sajax_handle_client_request();
        break;

    case "discounts_type,discounts" :
        sajax_init();
        sajax_export("GetListProducts");
        sajax_handle_client_request();
        break;

    case "orderslist,productlist" :
        sajax_init();
        sajax_export("GetListProducts");
        sajax_handle_client_request();
        break;
}

$core->doAction();
echo $core->render();

$core->shutdown();
unset($core);

?>